#ifndef TCPMESSAGE_H
#define TCPMESSAGE_H

#include <QObject>
#include <QtNetwork>
#include "tcpserver.h"
#include "msgthread.h"

class TcpMessage : public TcpServer
{
    Q_OBJECT
public:
    TcpMessage(quint16 port);
    ~TcpMessage();
    QString getHostIP();
    int startTCP();
    QString findSID(QString token);

    QMap<QString, MsgThread *> threadMap;
protected:

public slots:
    void msg_slot_connected(QString socketID);

signals:

private:
    TcpServer *tcpServer;
    QString hostIP;
    quint16 tcpPort;
};

#endif // TCPMESSAGE_H
